package simplyrugby.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 用户
 *
 * @TableName user
 */
@TableName(value = "user")
@Data
public class User implements Serializable {
    /**
     *
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     *
     */
    @TableField(value = "role_id")
    private String roleId;

    /**
     *
     */
    @TableField(value = "username")
    private String username;

    /**
     *
     */
    @TableField(value = "password")
    private String password;

    /**
     *
     */
    @TableField(value = "firstname")
    private String firstname;

    /**
     *
     */
    @TableField(value = "lastname")
    private String lastname;

    /**
     *
     */
    @TableField(value = "age")
    private String age;

    /**
     *
     */
    @TableField(value = "team_id")
    private String teamId;

    /**
     *
     */
    @TableField(value = "position_id")
    private String positionId;

    @TableField(value = "age_group_id")
    private String ageGroupId;

    @TableField(exist = false)
    private Position position;

    @TableField(exist = false)
    private Role role;

    @TableField(exist = false)
    private Team team;

    @TableField(exist = false)
    private List<Menu> menuList = new ArrayList<>();

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}